package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HisEngineRuleCommonMapper;
import com.ruoyi.system.domain.HisEngineRuleCommon;
import com.ruoyi.system.service.IHisEngineRuleCommonService;

/**
 * 通用规则逻辑Service业务层处理
 *
 * @author Alan
 * @date 2024-03-07
 */
@Service
public class HisEngineRuleCommonServiceImpl implements IHisEngineRuleCommonService
{
    @Autowired
    private HisEngineRuleCommonMapper hisEngineRuleCommonMapper;

    /**
     * 查询通用规则逻辑
     *
     * @param id 通用规则逻辑主键
     * @return 通用规则逻辑
     */
    @Override
    public HisEngineRuleCommon selectHisEngineRuleCommonById(Long id)
    {
        return hisEngineRuleCommonMapper.selectHisEngineRuleCommonById(id);
    }

    /**
     * 查询通用规则逻辑列表
     *
     * @param hisEngineRuleCommon 通用规则逻辑
     * @return 通用规则逻辑
     */
    @Override
    public List<HisEngineRuleCommon> selectHisEngineRuleCommonList(HisEngineRuleCommon hisEngineRuleCommon)
    {
        return hisEngineRuleCommonMapper.selectHisEngineRuleCommonList(hisEngineRuleCommon);
    }

    /**
     * 新增通用规则逻辑
     *
     * @param hisEngineRuleCommon 通用规则逻辑
     * @return 结果
     */
    @Override
    public int insertHisEngineRuleCommon(HisEngineRuleCommon hisEngineRuleCommon)
    {
        hisEngineRuleCommon.setCreateTime(DateUtils.getNowDate());
        return hisEngineRuleCommonMapper.insertHisEngineRuleCommon(hisEngineRuleCommon);
    }

    /**
     * 修改通用规则逻辑
     *
     * @param hisEngineRuleCommon 通用规则逻辑
     * @return 结果
     */
    @Override
    public int updateHisEngineRuleCommon(HisEngineRuleCommon hisEngineRuleCommon)
    {
        return hisEngineRuleCommonMapper.updateHisEngineRuleCommon(hisEngineRuleCommon);
    }

    /**
     * 批量删除通用规则逻辑
     *
     * @param ids 需要删除的通用规则逻辑主键
     * @return 结果
     */
    @Override
    public int deleteHisEngineRuleCommonByIds(Long[] ids)
    {
        return hisEngineRuleCommonMapper.deleteHisEngineRuleCommonByIds(ids);
    }

    /**
     * 删除通用规则逻辑信息
     *
     * @param id 通用规则逻辑主键
     * @return 结果
     */
    @Override
    public int deleteHisEngineRuleCommonById(Long id)
    {
        return hisEngineRuleCommonMapper.deleteHisEngineRuleCommonById(id);
    }
}
